<?php

databaseConnect();
function home(){
	$sql = "SELECT ArticleNumber, FirstName, SurName, Title, Content, PostDateTime 
			FROM news, users
			WHERE Createdby = UserName";
	$res = mysql_query ($sql);
	
	while ($row = mysql_fetch_assoc($res)){
		$newsarticle[$row['ArticleNumber']] = array ("Datum" => $row['PostDateTime'],
													"Author" => $row['FirstName']." ".$row['SurName'],
													"Content" => $row['Content']);
	}
	$sql = "SELECT SpeakerNumber, FirstName, SurName, Background, Subject, Picture 
			FROM speakers";
	$res = mysql_query($sql);
	while ($row = mysql_fetch_assoc($res)){
		$speakers[$row['SpeakerNumber']] = array ("Name" => $row['FirstName']." ".$row['SurName'],
													"Background" => $row['Background'],
													"Subject" => $row['Subject'],
													"Picture" => $row['Picture']);
	}
var_dump ($speakers);
}





?>
